package cn.gene.timeyan.ums.webapi.ums.mapper;

import cn.gene.timeyan.pojo.ums.dto.AddHonorDTO;
import cn.gene.timeyan.pojo.ums.vo.HonorVO;
import com.baomidou.dynamic.datasource.annotation.DS;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;
@Repository
public interface HonorMapper {
    @DS("scoreLevel")
    //获取徽章列表
    List<HonorVO> getHonorList();
    @DS("scoreLevel")
    int selectHonorByHonorName(@Param("honorName") String honorName);
    @DS("scoreLevel")
    int insertNewHonor(AddHonorDTO honorDTO);
    @DS("scoreLevel")
    int updateHonorName(@Param("name")String name, @Param("honorId") Long honorId);
    @DS("scoreLevel")
    int updateHonorImg(@Param("url") String url,@Param("honorId") Long honorId);
    @DS("scoreLevel")
    int updateHonorEnd(@Param("end")LocalDateTime end,@Param("honorId") Long honorId);
    @DS("scoreLevel")
    int updateHonorAvailable(@Param("available")Character available,@Param("honorId") Long honorId);
    @DS("scoreLevel")
    int updateHonorAcquireWay(@Param("way")String way,@Param("honorId") Long honorId);
    @DS("scoreLevel")
    String selectHonorByHonorId(@Param("honorId") Long honorId);
    @DS("scoreLevel")
    LocalDateTime getEndTimeByHonorId(@Param("honorId")Long honorId);
    @DS("scoreLevel")
    String getAvailableByHonorId(@Param("honorId")Long honorId);
    @DS("scoreLevel")
    HonorVO getHonorById(@Param("honorId") Long honorId);
    @DS("scoreLevel")
    String getHonorUrlByHonorId(@Param("honorId") Long honorId);
    @DS("scoreLevel")
    void updateUrlByHonorId(@Param("honorId") Long honorId,@Param("url") String url);
}
